home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1993…ch: Other People's Memory / ADC Developer CD (1993-03) (''Other People's Memory'')_iso / Dev.CD Mar 93.iso / Development Platforms / Apple II / Essentials / APW Interfaces / AInclude / E16.SANE < prev    next >
Encoding:
Text File  |  1991-07-01  |  7.1 KB  |  161 lines  |  [TEXT/MPS ]

  1. ; File:  E16.SANE
  2. ;
  3. ;
  4. ; Copyright Apple Computer, Inc. 1986-90
  5. ; All Rights Reserved
  6. ;
  7. ;
  8. SIGDIGLEN GEQU $001C
  9. IEEEDEFAULTENV GEQU $0000
  10. FLOATDECIMAL GEQU $0000
  11. FIXEDDECIMAL GEQU $0001
  12. INVALID GEQU $0001
  13. UNDERFLOW GEQU $0002
  14. OVERFLOW GEQU $0004
  15. DIVBYZERO GEQU $0008
  16. INEXACT GEQU $0010
  17. ;-----------------------------------------------------------
  18. ; Tool Set and Function Numbers.
  19. ;-----------------------------------------------------------
  20. SANEtsNum       gequ     $A              ; SANE tool set number
  21.  
  22. FPNum           gequ     $9              ; Function number for Arithmetic
  23. DecStrNum       gequ     $A              ; Function number for Scanner/Formatter
  24. ElemNum         gequ     $B              ; Function no. for Elementary functions
  25.  
  26. ;-----------------------------------------------------------
  27. ; Operation code masks.
  28. ;-----------------------------------------------------------
  29. FOADD           gequ     $00             ; add
  30. FOSUB           gequ     $02             ; subtract
  31. FOMUL           gequ     $04             ; multiply
  32. FODIV           gequ     $06             ; divide
  33. FOCMP           gequ     $08             ; compare, no exception from unordered
  34. FOCPX           gequ     $0A             ; compare, signal invalid if unordered
  35. FOREM           gequ     $0C             ; remainder
  36. FOZ2X           gequ     $0E             ; convert to extended
  37. FOX2Z           gequ     $10             ; convert from extended
  38. FOSQRT          gequ     $12             ; square root
  39. FORTI           gequ     $14             ; round to integral value
  40. FOTTI           gequ     $16             ; truncate to integral value
  41. FOSCALB         gequ     $18             ; binary scale
  42. FOLOGB          gequ     $1A             ; binary log
  43. FOCLASS         gequ     $1C             ; classify
  44. FONEXT          gequ     $1E             ; next-after
  45.  
  46. FOSETENV        gequ     $01             ; set environment
  47. FOGETENV        gequ     $03             ; get environment
  48. FOSETHV         gequ     $05             ; set halt vector
  49. FOGETHV         gequ     $07             ; get halt vector
  50. FOD2B           gequ     $09             ; convert decimal to binary
  51. FOB2D           gequ     $0B             ; convert binary to decimal
  52. FONEG           gequ     $0D             ; negate
  53. FOABS           gequ     $0F             ; absolute value
  54. FOCPYSGN        gequ     $11             ; copy sign
  55. ; UNDEFINED     gequ     $13
  56. FOSETXCP        gequ     $15             ; set exception
  57. FOPROCENTRY     gequ     $17             ; procedure-entry
  58. FOPROCEXIT      gequ     $19             ; procedure-exit
  59. FOTESTXCP       gequ     $1B             ; test exception
  60. ; UNDEFINED     gequ     $1D
  61. ; UNDEFINED     gequ     $1F
  62.  
  63. ;-----------------------------------------------------------
  64. ; Operand format masks.
  65. ;-----------------------------------------------------------
  66. FFEXT           gequ     $000            ; extended -- 80-bit float
  67. FFDBL           gequ     $100            ; double   -- 64-bit float
  68. FFSGL           gequ     $200            ; single   -- 32-bit float
  69. FFLNG           gequ     $300            ; longint  -- 32-bit integer                                                   
  70. FFINT           gequ     $400            ; integer  -- 16-bit integer
  71. FFCOMP          gequ     $500            ; comp     -- 64-bit integer
  72. ; UNDEFINED     gequ     $600
  73. ; UNDEFINED     gequ     $700
  74.  
  75. ;-----------------------------------------------------------
  76. ; Class and sign inquiries.
  77. ;-----------------------------------------------------------
  78. FCSNAN          gequ     $FC             ; -4: signaling NAN
  79. FCQNAN          gequ     $FD             ; -3: quiet NAN
  80. FCINF           gequ     $FE             ; -2: infinite
  81. FCZERO          gequ     $FF             ; -1: zero
  82. FCNORM          gequ     $00             ;  0: normal
  83. FCDENORM        gequ     $01             ;  1: denormal
  84.  
  85. ;-----------------------------------------------------------
  86. ; Exceptions.
  87. ;-----------------------------------------------------------
  88. FBINVALID       gequ     $1
  89. FBUFLOW         gequ     $2
  90. FBOFLOW         gequ     $4
  91. FBDIVZER        gequ     $8
  92. FBINEXACT       gequ     $10
  93.  
  94. ;-----------------------------------------------------------
  95. ; Elementary function operation code masks.
  96. ;-----------------------------------------------------------
  97. FOLNX           gequ     $00             ; base-e log 
  98. FOLOG2X         gequ     $02             ; base-2 log
  99. FOLN1X          gequ     $04             ; ln (1 + x)
  100. FOLOG21X        gequ     $06             ; log2 (1 + x)
  101. FOEXPX          gequ     $08             ; base-e exponential  
  102. FOEXP2X         gequ     $0A             ; base-2 exponential
  103. FOEXP1X         gequ     $0C             ; exp (x) - 1
  104. FOEXP21X        gequ     $0E             ; exp2 (x) - 1
  105. FOXPWRI         gequ     $10             ; integer exponentiation
  106. FOXPWRY         gequ     $12             ; general exponentiation
  107. FOCOMPOUND      gequ     $14             ; compound
  108. FOANNUITY       gequ     $16             ; annuity
  109. FOATANX         gequ     $18             ; arctangent
  110. FOSINX          gequ     $1A             ; sine
  111. FOCOSX          gequ     $1C             ; cosine
  112. FOTANX          gequ     $1E             ; tangent
  113. FORANDX         gequ     $20             ; random
  114.  
  115. ;-----------------------------------------------------------
  116. ; Scanner and formatter operation code masks.
  117. ;-----------------------------------------------------------
  118. FOPSTR2DEC      gequ     0               ; Pascal string to decimal record
  119. FOCSTR2DEC      gequ     2               ; C string (char stream) to dec. record
  120. FODEC2STR       gequ     1               ; decimal record to (Pascal) string
  121.  
  122. ;-----------------------------------------------------------
  123. ; NaN codes.  
  124. ;-----------------------------------------------------------
  125. NANSQRT         gequ     1               ; Invalid square root such as sqrt(-1)
  126. NANADD          gequ     2               ; Invalid addition such as +INF - +INF 
  127. NANDIV          gequ     4               ; Invalid division such as 0/0 
  128. NANMUL          gequ     8               ; Invalid multiply such as 0 * INF 
  129. NANREM          gequ     9               ; Invalid rem or mod such as x REM 0 
  130. NANASCBIN       gequ     17              ; Conversion of invalid ASCII string 
  131. NANCOMP         gequ     20              ; Comp NaN converted to floating
  132. NANZERO         gequ     21              ; Attempt to create a NaN with zero code
  133. NANTRIG         gequ     33              ; Invalid argument to trig routine 
  134. NANINVTRIG      gequ     34              ; Invalid arg to inverse trig routine 
  135. NANLOG          gequ     36              ; Invalid argument to log routine 
  136. NANPOWER        gequ     37              ; Invalid argument to x^i or x^y routine 
  137. NANFINAN        gequ     38              ; Invalid argument to financial function 
  138.             
  139.  
  140. relop_GREATERTHAN GEQU 0 ;
  141. relop_LESSTHAN GEQU 1 ;
  142. relop_EQUALTO GEQU 2 ;
  143. relop_UNORDERED GEQU 3 ;
  144.  
  145. numclass_SNAN GEQU 0 ;
  146. numclass_QNAN GEQU 1 ;
  147. numclass_INFINITE GEQU 2 ;
  148. numclass_ZERONUM GEQU 3 ;
  149. numclass_NORMALNUM GEQU 4 ;
  150. numclass_DENORMALNUM GEQU 5 ;
  151.  
  152. rounddir_TONEAREST GEQU 0 ;
  153. rounddir_UPWARD GEQU 1 ;
  154. rounddir_DOWNWARD GEQU 2 ;
  155. rounddir_TOWARDZERO GEQU 3 ;
  156.  
  157. roundpre_EXTPRECISION GEQU 0 ;
  158. roundpre_DBLPRECISION GEQU 1 ;
  159. roundpre_FLOATPRECISION GEQU 2 ;
  160.  
  161.